(function (aopc) {
    aopc.addExpandPage(841, function (get) {
        const Md5 = get('UtilsCommon', 'Md5');
        const Bridge = get('UtilsCommon', 'Bridge');

        return {
            expandInit() {
                this.isBranchPage = true;
                this.welcome_container_view = this.getProperty('welcome_container_view');
                this.lock_screen_container_view = this.getProperty('lock_screen_container_view');
            },
            expandDataLoad({ data }) {
                if (data.MeetingId) {
                    if (!data.WelcomeBackImageUrl) {
                        if (this.theme === 'red') data.WelcomeBackImageUrl = 'images/yxinmt_h5/25081616162200761.jpg';
                        else data.WelcomeBackImageUrl = 'images/yxinmt_h5/24111120500579060.jpg';
                    }
                    this.welcome_container_view.style.backgroundImage = `url(${data.WelcomeBackImageUrl})`;
                    this.welcome_container_view.refresh();
                }
            },
            expandSetEntityData({ entityData }) {
                entityData.Password = Md5(entityData.Password);
                entityData.MeetingId = this.pageData.MeetingId;
                return entityData;
            },
            successCallback({ data }) {
                this.pageData.LockScreenId = data.LockScreenId;
                this.alertSuccess('锁屏成功', () => {
                    this.lock_screen_container_view.setIsVisible(false);
                    this.welcome_container_view.setIsVisible(true);
                });
            },
            setLockEntityData({ entityData }) {
                entityData.Password = Md5(entityData.Password2);
                delete entityData.Password2;
                return entityData;
            },
            successCallback2() {
                Bridge.jsToNative("closeDialog");
            },
            closeDialog() {
                Bridge.jsToNative("closeDialog");
            }
        }
    });
})(window.aopc);